﻿
namespace Marmat.Forms.Views
{
    namespace Grid
    {
        public class CustomColumnDisplayTextEventArgs
        {
            internal DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs info;

            internal CustomColumnDisplayTextEventArgs(DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs info)
            {
                this.info = info;
            }

            public BaseGrid GridControl
            {
                get
                {
                    return this._GridControl;
                }
            }

            internal BaseGrid _GridControl;

            public Column Column
            {
                get
                {
                    if (this.info.Column.Tag is Column)
                    {
                        return (Column)this.info.Column.Tag;
                    }

                    return null;
                }
            }

            public string DisplayText
            {
                get
                {
                    return this.info.DisplayText;
                }

                set
                {
                    this.info.DisplayText = value;
                }
            }

            public object Value
            {
                get
                {
                    return this.info.Value;
                }
            }

            public object Row
            {
                get
                {
                    return this.GridControl.GetRow(this.info.ListSourceRowIndex);
                }
            }
        }
    }
}